import random


def getRandomNum(bits):
    num_set = [chr(i) for i in range(48, 58)]
    # char_set = [chr(i) for i in range(97,123)]
    # total_set = num_set + char_set
    total_set = num_set

    value_set = "".join(random.sample(total_set, bits))

    return value_set


def getRandomStr(bits):
    num_set = [chr(i) for i in range(48, 58)]
    char_uperr = [chr(i) for i in range(65, 91)]
    char_set = [chr(i) for i in range(97, 123)]
    total_set = num_set + char_set + char_uperr

    value_set = "".join(random.sample(total_set, bits))

    return value_set
